package com.cloud.spring.demo.service;

import com.cloud.spring.dao.AddressDao;
import com.cloud.spring.demo.entity.Address;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AddressService {
    @Autowired
    AddressDao addressDao;

    public int insert() {
        Address address = new Address();
        address.setId(2);
        address.setName("YanTai");
        address.setMessage("sdfstertet");
        address.setUserId(1);
        return addressDao.insert(address);
    }

    public Address findById2(int id) {
        return addressDao.findById2(id);
    }
}
